<?php
namespace app\admin\org;

use app\admin\model\Account as AccountModel;
use think\Db;
use think\Request;

class Search
{
    static public function Search()
    {
        //接收ajax传递的值
        $accountmodel = new AccountModel;
        $request = request();
        $ispost = $request->isPost();
        if($ispost){
            $startDate = $_POST["startDate"];
            $endDate = $_POST["endDate"];
            $betweenTime = $accountmodel->whereTime('last_login_at','between',['$startDate','$endDate'])->select();
            return json([
                'code' => 200,
                'view'=>$betweenTime,
            ]);
        }
    }
}